function mineReadFile(path) {
    const p = new Promise((resolve, reject) => {
        require('fs').readFile(path, (err, data) => {
            if (err) reject(err);
            resolve(data);
        })
    })

    return p;
}

mineReadFile('../resources/content.txt').then((data) => {
    console.log(data.toString());
}, (reason) => {
    console.log(reason);
})